package durak.client.view;

import durak.client.control.ClientSessionControl;
import durak.common.control.GameCommand;
import durak.common.model.Cards;

public class PlayerView {

	public void viewHand(Cards cards) {
		for (int i = 0; cards.size() > i; i++) {
			System.out.println(i + " " + cards.getCardByLocation(i));
		}
	}

	public void viewCardsOnTable() {

	}

	public void viewCommandFromServer(ClientSessionControl clientSessionControl) {
		//

	}

	public void endOfturn() {
		System.out.println("Turn Ends");

	}

	public void viewCommandRecievedFromClient(GameCommand clientCommand, String name) {
		System.out.println(" Recieved command from " + name +" " + clientCommand.getCommandType());
	}

	public void ChooseCardToAttack() {
		System.out.println("Choose with what card would you like to attack");

	}

	public void ShowCardsToAttack(Cards cards) {
		ShowCardsAndMessage(cards,"Choose with what card would you like to attack");
	}

	public void ShowCardsToDeffend(Cards cards) {
		ShowCardsAndMessage(cards,"Choose with what card would you like to defend");
	}
	
	public void ShowCardsAndMessage(Cards cardsToShow, String message) {
		System.out.println(message);
		viewHand(cardsToShow);
	}

	public void messageNotLegalAttack() {
		System.out.println("You can't attack with this card");
		System.out.println("Press 1 to pick another card to attack with");
		System.out.println("Press 2 to end your turn");

	}
	
	public void showMessage(String message) {
		System.out.println(message);
	}

}
